#include "Function.h"


Function::Function(vm *_env, Expr *_expr, Token *_tok)
    : env(_env), argExpr(_expr), Expr(_tok)
{
    type = FLT;
}


Function::~Function(void)
{
    delete argExpr;
}

float Function::DoEvalFlt()
{
    return env->EvalFunction(token->GetStrProp(), argExpr->EvalFlt());
}
